﻿using System;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using WeChat.Entity;
using WeChat.Utility;

namespace WeChat.EntityFramework.Mapping
{
    /// <summary>
    /// 用户实体 Mapping
    /// </summary>
    public class WeChatUsersMapping : WeChatBaseMap<WeChatUsers, int>
    {
        public WeChatUsersMapping() : base("Users")
        {
        }

        public override void MapperConfigure(EntityTypeBuilder<WeChatUsers> builder)
        {
            builder.HasData(new WeChatUsers()
            {
                Id = 1,
                CreatedTime = DateTime.Now,
                UserName = "admin",
                UserNick = "超管",
                UserPwd = "123456".Md5Ext()
            });
        }
    }
}
